// 封装信息提示
import { ElMessage } from 'element-plus'

const message = {
    success: (message: any, duration = 3000) => {
        ElMessage({
            message,
            type: 'success',
            duration
        })
    },
    error: (message: any, duration = 3000) => {
        ElMessage({
            message,
            type: 'error',
            duration
        })
    },
    warning: (message: any, duration = 3000) => {
        ElMessage({
            message,
            type: 'warning',
            duration
        })
    },
    info: (message: any, duration = 3000) => {
        ElMessage({
            message,
            type: 'info',
            duration
        })
    }
}

export default message